import { ResultEnum } from '@/enums/httpEnum'

export enum PageEnum {
  // 登录
  BASE_LOGIN = '/login',
  BASE_LOGIN_NAME = 'Login',

  //重定向
  REDIRECT = '/redirect',
  REDIRECT_NAME = 'Redirect',
  RELOAD = '/reload',
  RELOAD_NAME = 'Reload',


  // 首页
  BASE = '/index',
  BASE_NAME = 'index',
  BASE_HOME = '/home',
  BASE_HOME_NAME = 'Home',

  VIEW = '/view',
  VIEW_NAME = 'view',
  VIEW_HOME = '/viewHome',
  VIEW_HOME_NAME = 'view-home',

  // 我的项目
  BASE_HOME_ITEMS = '/admin',
  BASE_HOME_ITEMS_NAME = 'index-Items',

  BASE_FIGHT_LIST = '/fightList',
  BASE_FIGHT_LIST_NAME = 'fight-list',

  BASE_VEHICLE_STATISTICS = '/vehicleStatistics',
  BASE_VEHICLE_STATISTICS_NAME = 'vehicle-statistics',

  // 系统设置
  SYS_CONFIG='/sysConfig',
  SYS_CONFIG_NAME='sys-config',
  SYS_CONFIG_TITLE='系统管理',

  SYS_UNIT_CONFIG = '/unitConfig',
  SYS_UNIT_CONFIG_NAME = 'unit-config',
  SYS_UNIT_CONFIG_TITLE = '部门管理',

  SYS_USER_CONFIG = '/userConfig',
  SYS_USER_CONFIG_NAME = 'user-config',
  SYS_USER_CONFIG_TITLE = '用户管理',

  SYS_ROLE_CONFIG = '/roleConfig',
  SYS_ROLE_CONFIG_NAME = 'role-config',
  SYS_ROLE_CONFIG_TITLE = '角色管理',

  SYS_PERMISSIONS_CONFIG = '/permissionsConfig',
  SYS_PERMISSIONS_CONFIG_NAME = 'permissions-config',
  SYS_PERMISSIONS_CONFIG_TITLE = '权限管理',

  EXAMPLE_CHART = '/chart',
  EXAMPLE_CHART_NAME = 'example-chart',
  EXAMPLE_CHART_TITLE = '图表',

  EXAMPLE_CHART_LINE = '/chartLine',
  EXAMPLE_CHART_LINE_NAME = 'example-chart-line',
  EXAMPLE_CHART_LINE_TITLE = '折线图',

  EXAMPLE_CHART_BAR = '/chartBar',
  EXAMPLE_CHART_BAR_NAME = 'example-chart-bar',
  EXAMPLE_CHART_BAR_TITLE = '柱状图',

  EXAMPLE_BULLET_CHART = '/bulletChart',
  EXAMPLE_BULLET_CHART_NAME = 'example-bullet-chart',
  EXAMPLE_BULLET_CHART_TITLE = 'bulletChart',

  EXAMPLE_GRAPH = '/graph',
  EXAMPLE_GRAPH_NAME = 'graph-view',
  EXAMPLE_GRAPH_TITLE = '画布',

  EXAMPLE_GRAPH_X6 = '/graphX6',
  EXAMPLE_GRAPH_X6_NAME = 'graph-view-x6',
  EXAMPLE_GRAPH_X6_TITLE = 'X6体系树示例',

  EXAMPLE_GANTT = '/gantt',
  EXAMPLE_GANTT_NAME = 'gantt',
  EXAMPLE_GANTT_TITLE = '甘特类',

  EXAMPLE_GANTT_DHTML= '/ganttDhtml',
  EXAMPLE_GANTT_DHTML_NAME= 'gantt-dhtml',
  EXAMPLE_GANTT_DHTML_TITLE= 'gantt-dhtml示例',

  EXAMPLE_GANTT_DHTML_Z= '/ganttDhtmlZ',
  EXAMPLE_GANTT_DHTML_Z_NAME= 'gantt-dhtml-z',
  EXAMPLE_GANTT_DHTML_Z_TITLE= 'gantt-dhtml自定义示例',

  EXAMPLE_GANTT_MULTI_TASK= '/ganttMultiTask',
  EXAMPLE_GANTT_MULTI_TASK_NAME= 'gantt-multi-task',
  EXAMPLE_GANTT_MULTI_TASK_TITLE= '多任务gantt',

  EXAMPLE_TABLE= '/table',
  EXAMPLE_TABLE_NAME= 'table',
  EXAMPLE_TABLE_TITLE= '表格类',

  EXAMPLE_TABLE_EL= '/elTable',
  EXAMPLE_TABLE_EL_NAME= 'el-table',
  EXAMPLE_TABLE_EL_TITLE= 'El-Table',

  EXAMPLE_Z_TABLE= '/zTable',
  EXAMPLE_Z_TABLE_NAME= 'z-table',
  EXAMPLE_Z_TABLE_TITLE= 'ZTable示例',

  EXAMPLE_Z_TABLE_TREE= '/zTableTree',
  EXAMPLE_Z_TABLE_TREE_NAME= 'z-table-tree',
  EXAMPLE_Z_TABLE_TREE_TITLE= 'ZTableTree示例',

  EXAMPLE_TABLE_EL_DRAG= '/elTableDrag',
  EXAMPLE_TABLE_EL_DRAG_NAME= 'el-table-drag',
  EXAMPLE_TABLE_EL_DRAG_TITLE= 'El-Table-Drag',

  EXAMPLE_TABLE_SEARCH= '/tableSearch',
  EXAMPLE_TABLE_SEARCH_NAME= 'table-search',
  EXAMPLE_TABLE_SEARCH_TITLE= '表格筛选组件',

  EXAMPLE_TREE= '/tree',
  EXAMPLE_TREE_NAME= 'tree',
  EXAMPLE_TREE_TITLE= '树',

  EXAMPLE_Z_TREE= '/zTree',
  EXAMPLE_Z_TREE_NAME= 'z-tree',
  EXAMPLE_Z_TREE_TITLE= '树组件',

  EXAMPLE_Z_MATH= '/math',
  EXAMPLE_Z_MATH_NAME= 'z-math',
  EXAMPLE_Z_MATH_TITLE= '计算',

  EXAMPLE_Z_MATHJAX= '/mathjax',
  EXAMPLE_Z_MATHJAX_NAME= 'z-mathjax',
  EXAMPLE_Z_MATHJAX_TITLE= '计算模型示例',

  EXAMPLE_FORM= '/form',
  EXAMPLE_FORM_NAME= 'form',
  EXAMPLE_FORM_TITLE= '表单',

  EXAMPLE_Z_FORM= '/zForm',
  EXAMPLE_Z_FORM_NAME= 'z-form',
  EXAMPLE_Z_FORM_TITLE= '表单组件',

  // 错误
  ERROR_PAGE_NAME_403 = 'ErrorPage403',
  ERROR_PAGE_NAME_404 = 'ErrorPage404',
  ERROR_PAGE_NAME_500 = 'ErrorPage500'
}

export const ErrorPageNameMap = new Map([
  [ResultEnum.NOT_FOUND, PageEnum.ERROR_PAGE_NAME_404],
  [ResultEnum.SERVER_FORBIDDEN, PageEnum.ERROR_PAGE_NAME_403],
  [ResultEnum.SERVER_ERROR, PageEnum.ERROR_PAGE_NAME_500]
])
